import { request } from '@umijs/max';

// 获取openid
export async function getHomeData(params: API.Params = {}) {
    return request(`/dataCollection/getHomeData`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取货物详情
export async function getGoodsDetail(params: API.Params = {}) {
    return request(`/dataCollection/getGoodsDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取货物列表
export async function getGoodsList(params: API.Params = {}) {
    return request(`/dataCollection/getGoodsList`, {
        method: 'GET',
        params: { ...params }
    });
}

//获取运输列表
export async function getTransportList(params: API.Params = {}) {
    return request(`/dataCollection/getTransportList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取运输详情
export async function getTransportDetailDetail(params: API.Params = {}) {
    return request(`/dataCollection/getTransportDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取跨境货代列表
export async function getCrossborderList(params: API.Params = {}) {
    return request(`/dataCollection/getCrossborderList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取跨境货代详情
export async function getCrossborderListDetail(params: API.Params = {}) {
    return request(`/dataCollection/getCrossborderDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取专业代办列表
export async function getProfessionalList(params: API.Params = {}) {
    return request(`/dataCollection/getProfessionalList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取专业代办详情
export async function getProfessionalListDetail(params: API.Params = {}) {
    return request(`/dataCollection/getProfessionalDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取生活广告列表
export async function getLifeadList(params: API.Params = {}) {
    return request(`/dataCollection/getLifeadList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取生活广告详情
export async function getLifeadListDetail(params: API.Params = {}) {
    return request(`/dataCollection/getLifeadDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取曝光台列表
export async function getExposureList(params: API.Params = {}) {
    return request(`/dataCollection/getExposureList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取曝光台详情
export async function getExposureListDetail(params: API.Params = {}) {
    return request(`/dataCollection/getExposureDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取中俄新闻列表
export async function getNewsList(params: API.Params = {}) {
    return request(`/dataCollection/getNewsList`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取中俄新闻详情
export async function getNewsListDetail(params: API.Params = {}) {
    return request(`/dataCollection/getNewsDetail`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取资源库列表
export async function getLibraryList(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/resource/list`, {
        method: 'GET',
        params: { ...params }
    });
}
//获取资源库详情
export async function getLibraryDetail(params: API.Params = {}) {
    params.needLogin = true // 需要登录
    return request(`/resource/detail`, {
        method: 'GET',
        params: { ...params }
    });
}
